]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
style: Fix background color issue with menuitems
authorSam Hewitt <snwh@gnome.org>
Mon, 13 May 2024 15:52:36 +0000 (13:22 -0230)
committerJakub Steiner <jimmac@gmail.com>
Thu, 20 Jun 2024 10:15:04 +0000 (10:15 +0000)
- fix missing submenu bg colors
- add submenu color definitions

Fixes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/7570
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3311>

data/theme/gnome-shell-sass/_drawing.scss
data/theme/gnome-shell-sass/widgets/_popovers.scss

index 3f0259019cb680afe149c09ad06858bbc52191cb..39c6eb7b51c6ded7279adac1f956b351af5ee2e4 100644 (file)
   // extend common styles
   @extend %menuitem;
 
-  // lighten the background color always
-  $bg: lighten($bg,5%);
-
   @if $style == 'flat' {
     @include button(undecorated);
   } @else {
index 7f3df1ac8fb4248ff887270a8c913df0e97724ad..fdc4f17f1c6280ada9852af466ae49ed55b16eee 100644 (file)
@@ -1,10 +1,11 @@
 /* Popovers/Menus */
 
 $menu_bg_color: $bg_color;
-$menuitem_bg_color: lighten($menu_bg_color, 4%);
+
+$menuitem_bg_color:  if($variant == 'light', darken($menu_bg_color, 5%),  lighten($menu_bg_color, 5%));
 $menuitem_border_radius: $base_border_radius * 1.5;
 
-$submenu_bg_color: lighten($menu_bg_color, 7%);
+$submenu_bg_color: if($variant == 'light', darken($menu_bg_color, 17%),  lighten($menu_bg_color, 13%));
 
 // the popover itself
 .popup-menu-boxpointer {
@@ -33,7 +34,7 @@ $submenu_bg_color: lighten($menu_bg_color, 7%);
 
 // menu items
 .popup-menu-item {
-  @include menuitem($bg:$menu_bg_color);
+  @include menuitem($bg:$menuitem_bg_color);
 
   border-radius: $menuitem_border_radius;
 
@@ -75,6 +76,7 @@ $submenu_bg_color: lighten($menu_bg_color, 7%);
   border-radius: 0 0 $menuitem_border_radius+1px $menuitem_border_radius+1px;
   margin-bottom: $base_padding;
   border: 1px solid transparent;
+  background-color: $submenu_bg_color;
 
   @if $contrast == 'high' {
     border-color: $hc_inset_color;
@@ -83,8 +85,8 @@ $submenu_bg_color: lighten($menu_bg_color, 7%);
   // submenu specific styles
   .popup-menu-item {
     border-radius: 0;
-    @include menuitem($bg:$submenu_bg_color);
     border-top-width:0;
+    @include menuitem($bg:$submenu_bg_color);
 
     &:last-child {
       border-radius: 0 0 $menuitem_border_radius $menuitem_border_radius;